package rainQuality.rain;

import rainQuality.dao.RainManageDao;
import rainQuality.dao.impl.RainManageDaoImpl;
import rainQuality.entity.RainManage;
import rainQuality.servlet.RainManageService;
import rainQuality.servlet.impl.RainManageServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;

@WebServlet("/cxs")
public class seleteServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        RainManageService rainManageService=new RainManageServiceImpl();
        List<RainManage> listr=rainManageService.select();
        request.setAttribute("listr",listr);
        request.getRequestDispatcher("/RainManag/cx.jsp").forward(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request,response);
    }
}
